/*
*Data
*chenjie
*2012-5-4
*/
package com.pl.model
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.geom.Point;
	import flash.geom.Rectangle;

	public class Data
	{
		public static var playerWidth:int=600
		public static var playerHeight:int=540
			
		public static var swfWidth:int=600
		public static var swfHeight:int=600
		
		public static var playArr:Array=[]
		public static var btnBitmapDataArr:Array=[]
			
		public static var adTotalTime:int	
		public static var adCurTime:int	
		
		public function Data()
		{
		}
		
		public static function initBitmapDataArr(dis:DisplayObject):void{
			var sourceBitmapData:BitmapData=new BitmapData(dis.width,dis.height)
			sourceBitmapData.draw(dis)
				
			var tempRectangle:Rectangle = new Rectangle(0, 0, 32, 32);  
			var tPoint:Point = new Point(0, 0);
			
		   for(var i:int=1;i<=dis.height;i++){
		      if(i %32==0 && i != dis.height){
				  tempRectangle.y=i
				  var bitmapData:BitmapData=new BitmapData(32,32,false,0x000000)
				  bitmapData.copyPixels(sourceBitmapData,tempRectangle,tPoint)
				  btnBitmapDataArr.push(bitmapData)  
			  }
		   }
		   
		   
		}
		
	}
}